﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:ARSS_Editor_Common="clr-namespace:ARSS.Editor.Common" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="ARSS.Editor.SceneNodeWindow"
	x:Name="Window"
	Title="Scene Nodes Editor"
	Width="440.5" Height="364" WindowStyle="ToolWindow" Background="#FF202020" Foreground="White" mc:Ignorable="d">
	<Window.Resources>
		<ARSS_Editor_Common:SceneNode x:Key="SceneNodeDataSource" d:IsDataSource="True"/>
		<DataTemplate x:Key="TreeViewHeaderTemplate">
			<Grid>
                    <TextBlock Foreground="White" Text="{Binding Name}" />
                </Grid>
			</DataTemplate>
		<HierarchicalDataTemplate x:Key="DataTemplate1"
    			ItemsSource="{Binding Children}"
    			ItemTemplate="{StaticResource TreeViewHeaderTemplate}">
				<TextBlock Foreground="White" Text="{Binding Name}" />
		</HierarchicalDataTemplate>
	</Window.Resources>
	<StackPanel x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SceneNodeDataSource}}">
		<GroupBox Header="Scene Nodes">
			<TreeView x:Name="SceneNodeTreeView" Height="100" ItemTemplate="{DynamicResource DataTemplate1}" SelectedItemChanged="SceneNodeTreeView_SelectedItemChanged"/>
		</GroupBox>
		<GroupBox Header="Node Properties" Height="205.276">
			<Canvas x:Name="PropertiesCanvas" Height="164" Margin="0,10.827,0,0" VerticalAlignment="Top">
				<TextBlock Text="Name :" TextWrapping="Wrap" Canvas.Top="7.999"/>
				<TextBlock Canvas.Top="36.604" TextWrapping="Wrap"><Run Text="Model file:"/></TextBlock>
				<TextBox x:Name="NameTextBox" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="54.48" Width="309.244" Canvas.Top="3.995"/>
				<TextBox x:Name="ModelFileTextBox" Width="267.244" Text="{Binding ModelPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="54.48" Canvas.Top="31.269"/>
				<Button x:Name="ApplyButton" Width="99.333" Height="29.553" Content="Apply Changes" Canvas.Top="134.447" Click="ApplyButton_Click"/>
				<TextBlock Canvas.Top="58.171" TextWrapping="Wrap" Text="Translation: "/>
				<TextBox x:Name="TranslationXTextBox" Width="51.077" Text="{Binding Translation.X, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="82.425" Canvas.Top="55.781"/>
				<TextBlock Canvas.Top="58.781" TextWrapping="Wrap" Text="X:" Canvas.Left="66.162"/>
				<TextBox x:Name="TranslationYTextBox" Width="51.077" Text="{Binding Translation.Y, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="190.423" Canvas.Top="55.781"/>
				<TextBlock Canvas.Top="58.781" TextWrapping="Wrap" Text="Y:" Canvas.Left="174.166"/>
				<TextBox x:Name="TranslationZTextBox" Width="51.077" Text="{Binding Translation.Z, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="311.089" Canvas.Top="55.781"/>
				<TextBlock Canvas.Top="58.781" TextWrapping="Wrap" Text="Z:" Canvas.Left="294.833"/>
				<TextBlock Canvas.Top="84.141" TextWrapping="Wrap" Text="Scale:"/>
				<TextBox x:Name="ScaleXTextBox" Width="51.077" Text="{Binding Scale.X, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="82.425" Canvas.Top="81.751"/>
				<TextBlock Canvas.Top="84.751" TextWrapping="Wrap" Text="X:" Canvas.Left="66.162"/>
				<TextBox x:Name="ScaleYTextBox" Width="51.077" Text="{Binding Scale.Y, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="190.423" Canvas.Top="81.751"/>
				<TextBlock Canvas.Top="84.751" TextWrapping="Wrap" Text="Y:" Canvas.Left="174.166"/>
				<TextBox x:Name="ScaleZTextBox" Width="51.077" Text="{Binding Scale.Z, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="311.089" Canvas.Top="81.751"/>
				<TextBlock Canvas.Top="84.751" TextWrapping="Wrap" Text="Z:" Canvas.Left="294.833"/>
				<TextBlock Canvas.Top="110.139" TextWrapping="Wrap" Text="Rotation:"/>
				<TextBox x:Name="RotationXTextBox" Width="51.077" Text="{Binding Rotation.X, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="82.425" Canvas.Top="107.749"/>
				<TextBlock Canvas.Top="110.749" TextWrapping="Wrap" Text="X:" Canvas.Left="66.162"/>
				<TextBox x:Name="RotationYTextBox" Width="51.077" Text="{Binding Rotation.Y, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="190.423" Canvas.Top="107.749"/>
				<TextBlock Canvas.Top="110.749" TextWrapping="Wrap" Text="Y:" Canvas.Left="174.166"/>
				<TextBox x:Name="RotationZTextBox" Width="51.077" Text="{Binding Rotation.Z, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, FallbackValue=' '}" TextWrapping="Wrap" Canvas.Left="311.089" Canvas.Top="107.749"/>
				<TextBlock Canvas.Top="110.749" TextWrapping="Wrap" Text="Z:" Canvas.Left="294.833"/>
				<Button x:Name="DeleteButton" Width="103.333" Height="29.553" Content="Delete Node" Canvas.Left="114.667" Canvas.Top="134.447" Click="DeleteButton_Click"/>
				<Button x:Name="AddButton" Width="95.5" Height="29.553" Content="Add Child Node" Canvas.Left="241.5" Canvas.Top="134.447" Click="AddButton_Click"/>
				<Button x:Name="BrowseButton" Width="33.276" Height="18.612" Content="..." Click="BrowseButton_Click" Canvas.Left="326.393" Canvas.Top="32.43"/>
			</Canvas>
		</GroupBox>
	</StackPanel>
</Window>